<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8">
        <meta name="format-detection" content="telephone=no">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="cleartype" content="on">
	<meta name="HandheldFriendly" content="True">
	<meta name="MobileOptimized" content="320">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-title" content="APP TITLE">
        <meta name="robots" content="noindex,nofollow" />
        <title><?php echo $title_for_layout ?></title>

        <?php
        //echo $this->Html->meta('icon');
        echo $this->Html->css('mobile/css/foundation') . "\n";
        echo $this->Html->css('mobile/css/normalize') . "\n";
        echo $this->Html->css('mobile/css/style') . "\n";
        echo $this->Html->css('mobile/css/common') . "\n";
        echo $this->fetch('meta') . "\n";
        echo $this->fetch('css') . "\n";
        //echo $this->Html->css('contract.css?ver=2013120901') . "\n"; // Move to individual screen
        ?>
        <!--<link rel="stylesheet" href="< ?php echo $this->webroot?>css/usage_fee.css?ver=2013120901">-->
        <!--[if lt IE 9]>
        <link rel="stylesheet" href="<?php echo $this->webroot ?>css/ie8.css?ver=2013120601">
        <![endif]-->

        <?php echo $this->Html->css('mobile/css/custom') . "\n"; ?>

        <?php echo $this->Html->script('mobile/jquery') . "\n"; ?>
		<?php echo $this->Html->script('jquery.cookie') . "\n";?>
        <?php echo $this->Html->script('mobile/modernizr') . "\n"; ?>
        <!--[if lt IE 9]>
        <![endif]-->
        <script>
            var strYMDHI = <?php echo '"' . date('Y-m-d H:i') . '"'; ?>;
        </script>
        <?php echo $this->Html->script('mobile/system') . "\n"; ?>
        <?php echo $this->Html->script('mobile/design') . "\n"; ?>
        <?php echo $this->Html->script('common/config') . "\n"; ?>
        <?php echo $this->Html->script('languages/jpn') . "\n"; ?>
        <?php echo $this->Html->script('mobile/jquery.ah-placeholder') . "\n"; ?>
        <?php echo $this->fetch('script') . "\n" ?>
        <script type="text/javascript">
            $(document).ajaxError(function(e, jqXHR, ajaxSettings, thrownError) {
                // if 403 - check if user still has active session - if not redirect to login page
                if (jqXHR.status == '403') {
                    // inactive session so redirect to login page
                    window.location.href = "<?php echo $this->Html->url(array('controller' => 'members', 'action' => 'login')) ?>";

                }
            });
        </script>
        <script type="text/javascript">
            var WEB_ROOT = '<?php echo $this->webroot; ?>';
        </script>
    </head>
    <body<?php echo isset($bodyClassName) ? ' class="' . $bodyClassName . '" ' : ''; ?>>
        <header class="page_title row head">
            <nav id="mobile-bar" class="columns drawerBtn"><a id="responsive-menu-button" href="#sidr-main"></a></nav>
            <h1 class="columns"><?php echo $title_for_layout ?></h1>
            <!--<aside class="small-5 columns usage_agree"><a href="#">利用規約</a></aside>-->
        </header>
        <?php echo $this->fetch('content') ?>
        <footer class="clearfix" style="display: block;">
            <small>Copyright (c) Knowledge Society All Rights Reserved.</small>
        </footer>
        <!-- グローバルナビ -->
        <div id="navigation" style="display:none;">
            <nav id="main-nav">
                <ul class="account_info">
                    <li>
                        <nav class="sidemenu_control">
					        
                            <a class="close_button" href="#" onclick="sideMenu.close(); return false;"><img class="enable_retina" src="<?php echo $this->webroot ?>css/mobile/images/common/icon_close1_w27.png" alt="icon_close1_w27"></a>
                        </nav>
                        <div class="face_image_area">
							<!--  
                            <img class="frame" src="<?php echo $this->webroot ?>css/mobile/images/common/frame_face_circle.png" alt="frame_face_circle" width="46" height="46">
                            <img class="face" src="<?php echo Configure::read('s3_domain').$this->Session->read('user.avatar')?>" alt="img_face_image" width="46" height="46">
                            -->
                        </div><!-- // .face_image_area -->
                        <p class="name">(<?php echo $this->Session->read('user.name_l')?>)様</p>
                    </li>
                </ul>
            </nav>
            <nav id="secondary-nav">
                <ul class="menu-list">
                    <li class="news"><a href="<?php echo $this->Html->url(array('controller' => 'articles')); ?>">ニュース</a></li>
                    <li class="room_booking"><a href="<?php echo $this->Html->url(array('controller' => 'bookings', 'action' => 'index')); ?>">施設予約</a></li>
                    <li class="usage_status"><a href="<?php echo $this->Html->url(array('controller' => 'freeadrsAreas', 'action' => 'index'))?>">利用状況確認</a></li>
                    <li class="delivery"><a href="<?php echo $this->Html->url(array('controller' => 'transfers', 'action' => 'index'))?>">郵便・宅配便確認</a></li>
                    <li class="usage_fee"><a href="/payments">ご利用料金確認</a></li>
                    <li class="faq"><a href="<?php echo $this->Html->url(array('controller' => 'faq', 'action' => 'index'))?>">FAQ</a></li>
                </ul>
            </nav>
            <nav id="sidemenu_ad_area">
                <div id="ad-out">
                    <?php echo $this->App->getAdvertises('HD'); ?>
                </div>
                
            </nav>
            <nav id="sidemenu_footer_nav">
                <span class="btn_use_policy"><a href="">利用約款</a></span>
                <span class="btn_logout"><a href="<?php echo $this->Html->url(array('controller' => 'members', 'action' => 'logout'))?>">LOGOUT</a></span>
            </nav>
        </div>
        <!-- //グローバルナビ -->
        <?php echo $this->fetch('scriptBottom'); ?>
    </body>
</html>